FROM alpine:3.8

LABEL maintainer="wanghuan@mastercom.cn"

COPY skywalking-agent/ /skywalking-agent/

RUN mv /skywalking-agent/optional-plugins/apm-trace-ignore-plugin-* /skywalking-agent/plugins/ && \
    echo -e "\n# Ignore Path" >> /skywalking-agent/config/agent.config && \
    echo "# see https://github.com/apache/skywalking/blob/v8.7.0/docs/en/setup/service-agent/java-agent/agent-optional-plugins/trace-ignore-plugin.md" >> /skywalking-agent/config/agent.config && \
    echo 'trace.ignore_path=${SW_IGNORE_PATH:/health}' >> /skywalking-agent/config/agent.config